From: Reedy Date: Sun, 21 Oct 2012 14:14:10 +0000 (+0100) Subject: When deleting old thumbnails, actually increment $i X-Git-Tag: 1.31.0-rc.0~21920^2 X-Git-Url: http://git.cyclocoop.org/%22.%24info%5B?a=commitdiff_plain;h=cdbe6fee1f106bcd326a9ac45507258109d103f7;p=lhc%2Fweb%2Fwiklou.git When deleting old thumbnails, actually increment $i Change-Id: Ic213fed61959ab4d25bcd891c81df20e39cbc5f5 --- diff --git a/maintenance/cleanupUploadStash.php b/maintenance/cleanupUploadStash.php index 6afe9e11e0..dc03c349e4 100644 --- a/maintenance/cleanupUploadStash.php +++ b/maintenance/cleanupUploadStash.php @@ -70,7 +70,7 @@ class UploadStashCleanup extends Maintenance { array_push( $keys, $row->us_key ); } - $this->output( 'Removing ' . count($keys) . " file(s)...\n" ); + $this->output( 'Removing ' . count( $keys ) . " file(s)...\n" ); // this could be done some other, more direct/efficient way, but using // UploadStash's own methods means it's less likely to fall accidentally // out-of-date someday @@ -100,6 +100,7 @@ class UploadStashCleanup extends Maintenance { $this->output( "Deleting old thumbnails...\n" ); $i = 0; foreach ( $iterator as $file ) { + $i++; if ( wfTimestamp( TS_UNIX, $tempRepo->getFileTimestamp( "$dir/$file" ) ) < $cutoff ) { $tempRepo->quickPurge( "$dir/$file" ); }